package com.picket.domain;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable
public class UserPrediction {

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;

	@NotNull
	@Persistent
	private Long userPoolId;
	
	@NotNull
	@Persistent
	private Long matchId;	
	
	@NotNull
	@Persistent
	private Integer matchNo;

	@NotNull
	@Persistent
	private String matchPrediction;

	@Persistent
	private Integer predictionPoints;

	@Persistent
	private String matchSummary;

	@NotNull
	@Persistent
	private Date matchDateTime;

	@Persistent
	private String userEmail;
	
	@Size(min = 1, max = 45)
	@Persistent
	private String updateUserId;

	public UserPrediction( Long userPoolId, Long matchId,
			Integer matchNo, String matchSummary, String matchPrediction, Date matchDateTime, String userEmail, String updateUserId) {
		super();
		this.userPoolId = userPoolId;
		this.matchId = matchId;
		this.matchNo = matchNo;
		this.matchSummary = matchSummary;
		this.matchDateTime=matchDateTime;
		this.matchPrediction = matchPrediction;
		this.userEmail = userEmail;
		this.updateUserId = updateUserId;
	}

	public Key getKey() {
		return key;
	}

	public Long getId() {
		return key.getId();
	}

	public String getMatchSummary() {
		return matchSummary;
	}

	public void setMatchSummary(String matchSummary) {
		this.matchSummary = matchSummary;
	}

	public String getUserEmail() {
		return userEmail;
	}

	public void setUserEmail(String userEmail) {
		this.userEmail = userEmail;
	}
	
	public Integer getMatchNo() {
		return matchNo;
	}

	public void setMatchNo(Integer matchNo) {
		this.matchNo = matchNo;
	}
	public Long getUserPoolId() {
		return userPoolId;
	}

	public void setUserPoolId(Long userPoolId) {
		this.userPoolId = userPoolId;
	}

	public Long getMatchId() {
		return matchId;
	}

	public void setMatchId(Long matchId) {
		this.matchId = matchId;
	}

	public String getMatchPrediction() {
		return matchPrediction;
	}

	public void setMatchPrediction(String matchPrediction) {
		this.matchPrediction = matchPrediction;
	}

	public String getUpdateUserId() {
		return updateUserId;
	}

	public void setUpdateUserId(String updateUserId) {
		this.updateUserId = updateUserId;
	}

	public Integer getPredictionPoints() {
		return predictionPoints;
	}

	public void setPredictionPoints(Integer predictionPoints) {
		this.predictionPoints = predictionPoints;
	}	

	public Date getMatchDateTime() {
		return matchDateTime;
	}

	public void setMatchDateTime(Date matchDateTime) {
		this.matchDateTime = matchDateTime;
	}
	

}